package com.szt.mobile.inventory.common.utils;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;

import com.szt.mobile.inventory.R;

/**
 * Created by yanzhaodi on 2017/9/15.
 */

public class DialogUtil {

    public static void showSingleBtnDialog(Activity context, String message, DialogInterface.OnClickListener clickListener) {
        new AlertDialog.Builder(context)
                .setTitle("提示")
                .setMessage(message)
                .setNegativeButton("确定", clickListener)
                .create()
                .show();
    }

    public static void showTwoBtnDialog(Activity context, String message, DialogInterface.OnClickListener positionClickListener, DialogInterface.OnClickListener negativeClickListener) {
        new AlertDialog.Builder(context)
                .setTitle("提示")
                .setMessage(message)
                .setNegativeButton("否", negativeClickListener)
                .setPositiveButton("是", positionClickListener)
                .create()
                .show();
    }
    public static void showRFIDDialog(Activity context,String message, DialogInterface.OnClickListener clickListener){
        new AlertDialog.Builder(context)
                .setTitle(R.string.status_5)
                .setMessage(message)
                .setNegativeButton("确定", clickListener)
                .create()
                .show();
    }
}
